#Android Shimmer Implementation
Explore tagged Tumblr posts
Text
Add Loading Animation in Android App Using Shimmer
Add Loading Animation in Android App Using Shimmer
Shimmer is an Android library developed by Facebook to show loading animation while we loading data from API or from LocalDatabase. With the help of this library, we can implement shimmer animation effect to any view in Android.
Implementation of Shimmer library is very easy in your new or existing Android application. Check below simple steps to implement in your project.
Implementation Shimmer…
View On WordPress
0 notes
Link
0 notes
Photo

New Post has been published on https://magzoso.com/tech/oppo-f15-review/
Oppo F15 Review

Oppo has kicked off the new year with the launch of the Oppo F15 — its successor to the Oppo F11. Whether or not we’ll get an F15 Pro is yet to be seen, but for now, the F15 offers some necessary updates such as an in-display fingerprint sensor, quad rear cameras, a slim profile, and a new gradient finish for the back.
Priced at Rs. 19,990 for the sole 8GB RAM configuration, the Oppo F15 goes up against phones such as the Realme X2 (Review) and Redmi K20 (Review), both of which are power-packed devices and very good all-rounders for what they cost. Does the Oppo F15 pack enough features to be worth considering at this price? Let’s have a look.
Oppo F15 design
The new packaging for the Oppo F15 looks nice, and in the box you’ll find a silicone case, SIM eject tool, Type-C cable, 20W power adapter and a headset. We have the ‘Unicorn White’ colour trim of the F15, which looks eye-catching. The gradient finish at the back transitions from white at the top to hints of aqua blue and lilac towards the bottom. This is a still a laminated back panel though, not glass, but this colour should help hide fingerprints much better than the ‘Lightning Black’ trim. What immediately grabbed our attention when we picked up this phone was how slim and light it is. At 7.9mm in thickness and weighing 172g, it’s quite comfortable to carry around.
The Oppo F15 is a tall phone though, due to the 20:9 aspect ratio of the 6.4-inch display. You get an AMOLED panel with a full-HD+ (2400×1080) resolution and Corning’s Gorilla Glass 5. The display gets adequately bright and is legible even under sunlight. The colours are good and so is the sharpness of icons and text. There’s a prominent notch on the top for the selfie camera, and a visible chin at the bottom.

The Oppo F15 gets a new eye-catching colour
The glossy sides make the Oppo F15 a little slippery. The power and volume buttons are placed conveniently on the sides. At the bottom, there is a headphone socket, a USB Type-C port, and a speaker grille. This phone has a triple card slot for two Nano-SIMs and a microSD card. The back panel curves a bit on the sides for better ergonomics. The quad camera module on the rear protrudes slightly but not as much as on other phones such as the Realme X2. We also have the Oppo logo, placed vertically in the bottom left corner.
Overall, the Oppo F15 manages to look premium, at least in this colour. We would have liked more premium materials at this price though, such as a glass back. It’s also fairly slim and light for a phone with such a large display, which is something we don’t see too often.
Oppo F15 specifications and software
Oppo’s choice of the SoC in the F15 is a bit of a letdown. The MediaTek Helio P70 SoC was also used in the F11 series last year. While the chip itself offers decent performance, it’s at the level we would now typically expect of phones closer to the Rs. 10,000 mark (such as the Realme 3). The Oppo F15 definitely feels underpowered, considering that the Realme X2 and Redmi K20 offer Qualcomm’s superior Snapdragon 730 series SoCs at the same price.
The Oppo F15 is only available in one configuration, which is 8GB of RAM and 128GB of storage. The latter uses the UFS 2.1 standard, which is good. Other features include dual 4G with VoLTE, dual-band Wi-Fi 802.11ac, Bluetooth 4.2, Widevine L1 certification, GPS, and the usual suite of sensors. There’s no FM radio in this phone. You also get a 4,000mAh battery with Oppo’s VOOC 3.0 Flash Charge technology.

The Oppo F15 has a triple card tray for two Nano-SIM cards and a microSD card
Oppo only recently began trial runs of ColorOS 7 for some of its phones, so for now, we have to make do with ColorOS 6.1.2 on the Oppo F15, which is still based on Android 9 Pie. The look and feel of the interface is similar to what we’ve seen on recent Realme offerings, since they share the same OS. There are some minor differences, such as the absence of a system-wide dark mode.
Our unit had the January 2020 security patch, along with features such as Google’s Digital Wellbeing, plenty of shortcuts and gestures, and several preinstalled apps. Most of the third-party apps can be uninstalled if you like. There’s not a lot that’s new to talk about here, and you can read all about ColorOS in our recent reviews of the Oppo A9 (2020) (Review) or the Realme 5i (Review).
Oppo F15 performance and battery life
We used the Oppo F15 as our primary device for a few days, and the experience was pretty good. It’s not the easiest phone to fit into a pants pocket, but apart from that, we liked its lightness which made it effortless to use. You can enable one-handed mode through a toggle switch in the notification shade, but sadly, there’s no gesture to trigger it. The phone didn’t overheat when using the cameras extensively or even playing games, which is good.
Games ran fairly well too. PUBG Mobile defaulted to the ‘Medium’ graphics preset and gameplay was smooth. There’s also Oppo’s Game Assistant, which can be accessed within a game and offers options to block notifications, etc. Other stressful titles such as Asphalt 9: Legends also ran well, albeit at slightly reduced graphics quality.

The Oppo F15 offers decent performance, but for the price, it feels a bit underpowered
The Oppo F15 put on a good show in benchmarks too. AnTuTu returned 194,983 points, while GFXbench’s T-Rex test gave us 36fps. While these numbers are decent, this phone is well behind more powerful models powered by the Snapdragon 730 or 730G, such as the Redmi K20 and Realme X2 respectively.
The Oppo F15’s fingerprint and face recognition systems work very well too. Authentication is quick and face unlock even works well in dimly lit places. The phone holds up well for media playback as well. Full-HD videos look sharp, with punchy colours, and the viewing angles are quite wide. The mono speaker gets fairly loud but is lacking in bass.
Battery life is pretty solid. The Oppo F15 ran for 14 hours and 48 minutes in our HD video battery loop test, which is a good time. With regular use, we always managed to use this phone for over a full day, even with lots of gaming and camera usage. The F15 charges pretty quickly too. We were able to get the battery up to 47 percent in half an hour, and about 88 percent in an hour. It took about 20 minutes more after that to fully charge it.
Oppo F15 cameras
Compared to the Oppo F11, the F15 gets a much-needed camera upgrade. There’s a 48-megapixel primary sensor with an f/1.7 aperture; an 8-megapixel wide-angle camera that doubles up as the macro camera; a 2-megapixel depth sensor; and finally a 2-megapixel monochrome sensor. In the front, we have a 16-megapixel selfie camera with an f/2.0 aperture.
The camera app is similar to what we’ve seen on recent Oppo and Realme devices, albeit with a few missing features. The primary camera shoots oversampled 12-megapixel stills by default but there’s no option to shoot at the full 48-megapixel resolution. Other features such as super-steady video and the ability to use Night mode for the selfie camera are also absent.

Landscape shot taken with the Oppo F15 (tap for full-sized image)

An wide-angle shot taken with the Oppo F15 (tap for full-sized image)

A macro shot taken with the Oppo F15 (tap for full-sized image)
In daylight, the main sensor captures fairly detailed landscape shots. Colours are vivid, detail is good, and there’s little to no noise in darker areas. The HDR effect could have been better in some instances but overall, it’s not bad. The wide-angle camera has autofocus, so stills taken with this sensor have good detail — just not as good as what’s possible with the main sensor. Close-ups are sharp and detailed too, and if you get really close to your subject with the wide-angle camera, you’ll be able to get good macros. We like this implementation better than having a dedicated camera for macro photos.
Portrait mode worked decently well with human subjects and you can adjust the level of blur before taking the shot. Edge detection was decent and image quality was good, when shooting under good light.
In low light, we found image quality in landscape shots to be a little lacking. Details were weaker and there was visible noise in the darker regions. The ‘Night’ mode helps brighten up scenes but the details didn’t improve much. Shooting with the wide-angle camera at night, we got comparatively darker images with poorer details and colours. Close-ups fared a bit better, with decent detail and not too much visible noise.

Low-light landscape shot taken with the Oppo F15 (tap for full-sized image)

Low-light close-up shot taken with the Oppo F15 (tap for full-sized image)

Low-light selfie sample taken with the Oppo F15 (tap for full-sized image)
The selfie camera manages some pretty good-looking stills in daylight. Skin textures are smoothened a bit but HDR works well and colours are well represented. With good amounts of artificial light around, we managed to get pleasing enough selfies even at night. Portrait mode doesn’t work too well with the front camera, unfortunately, whether it’s day or night.
The Oppo F15 can only shoot at up to 1080p resolution and not 4K, which most of its competitors support. Video quality is slightly above average and there is stabilisation when shooting using the primary camera. With the wide-angle camera, videos aren’t stabilised. In low-light, video quality was noticeably worse with poor details and a persistent shimmer in the footage even with slight movement. You can shoot at up to 1080p using the selfie camera too, but without any stabilisation.
The camera app feels familiar, and in the viewfinder, you’ll find shortcuts for 2x and 5x digital zoom. The app also has Oppo’s ‘Dazzle Color’ toggle which boosts the saturation level of photos. Other shooting modes include Timelapse, Panorama, Slow-motion, AR stickers, and Expert. There’s a shortcut to activate Google Lens too.
Verdict
The new Oppo F15 is a good-looking smartphone, and a fairly decent upgrade over the Oppo F11. However, the sub-Rs. 20,000 segment has changed quite a bit compared to a year ago, which is why the F15 feels underpowered compared to its main rivals — the Realme X2 (Review) and the Redmi K20 (Review). The new camera setup is a nice upgrade, but overall image and video quality are not quite up to the mark.
What this phone does have going for it are its slimness, low weight, and good display. However, priced at Rs. 19,990, we think you’d be better off with either the Realme X2 or the Redmi K20 —both of which offer much better performance, more premium build quality, and more modern designs.
0 notes
Text
Nubia Z17 Mini Review: Good camera, not-so-good software
Nubia has recently added a new member to its Z series with the launch of Z17 Mini. Priced at RS 19,999, the smartphone joins the new trend of dual rear cameras. It also comes loaded with some interesting specs sheet, but will it be enough to outlast the competition to become the next desirable smartphone? Let's find out. Design and Display Nubia is known for making smartphones that don some good looks and this one is no exception. The metal unibody design coupled with chamfered edges gives a premium look and feel. However, it a tad slippery in nature so it is advisable you use a cover with it. The smartphone is, indeed, sleek with just 7.45mm thickness and is certainly lightweight with 155 grams. That said, the phone does resemble just like any other Chinese smartphone available in the market, which is a problem with almost all the players.
Let’s talk about the display in the Nubia Z17 Mini Review. The front houses a 5.2-inch screen, with some minimal side bezels, though top and bottom are quite noticeable, while at the base you get company’s trademark red colour circle at the bottom flanked between recent menu button and back button. On the right, you will find volume controls and just beneath it lies power on/off button, while on the left, there is dual SIM slot. At the back, you will find a dual-camera setup at the top-left corner of the device along with a LED flash, while if you go south, you will come across a fingerprint sensor along with company’s logo. The fingerprint scanner is pretty fast, which is a welcome move. Up top, there is a headphone jack, while at the base you will find USB Type-C port flanked between speaker grilles. Overall, the brand has tried to make the smartphone stand out of the crowd, however, the phone ends up with a similar design language that we have seen in other smartphones. Moving to the display department, the phone features a 5.2-inch Full HD screen with 1080p resolution and a pixel density of 424ppi, which is protected with Corning Gorilla Glass. The Nubia Z17 Mini comes with some good viewing angles and the display is bright enough for outdoor conditions. The display delivers some good colour output, however, we found out it to a bit reflective in nature. But at the end, it does score some good marks in this department. Camera The major highlight of the smartphone is the dual-camera setup situated on the back panel. There are two 13-megapixel sensors at the back, with one being a monochrome, while the other sporting an RGB lens. Both the camera uses Sony IMX258 sensor and there is also a sapphire glass protective lens, which is considered scratch proof. For the front, there is a 16-megapixel camera with 80-degree wide-angle lens for selfie and video calling.
Nubia has a reputation when it comes to camera department and its latest offering is no different. To start with, the camera uses one RGB and one monochrome sensor, which is similar to what we have seen in Honor 8 and Honor 6X. However, unlike the Honor smartphones, the implementation is not that great.
The phone manages to take some great shots
the lighting was appropriate and it is fast to lock focus. The monochrome shots came out to be good, with a good balance between the highlights and shadows. But when it comes low light conditions, the phone shimmers a bit. One can see a loss of quality while clicking in low light, which kind of spoils the mood. Moto G5 Plus, despite sporting a single camera setup, has a better performance compared to this one in the low light conditions. The phone also supports bokeh effect, which basically blurs out the background (artificially) to give a DSLR-like effect. The mode has its share of hits and misses. If the lighting is good and the subject is at an appropriate distance, the phone manages to do justice to the bokeh effect, other times it just ruins it. The camera UI is simple, though it looks too iPhone(ish). It comes with different modes like Multi Exposure, Mono, macro, 3D, LightDraw, DNG and so on, which are fun to use. That said, the phone does manage to click some good photos and comes loaded with some interesting modes, though the low-light performance could have been better, especially, with two sensors. Hardware and Software On the hardware front, the device is powered by an octa-core Qualcomm Snapdragon 652 processor along with 4GB of RAM and 64GB of internal storage out of which 11.84 GB is reserved for the system. The storage can be further expanded up to 200GB via microSD card slot. The brand has opted for an older 652 processor, which is more powerful than the latest Qualcomm Snapdragon 625, but it is less battery efficient. The phone was able to complete all the basics tasks we throw at it, be it surfing, streaming, social media and so on. We faced no big problem while multi-tasking as well, all thanks to the 4GB of RAM.
On the gaming front, it handles most of the casual games like a piece of cake, but when it comes to graphic-hungry games like Iron Blade, Asphalt 8: Airborne and Hitman Sniper, there were some noticeable lags. Overall, the hardware is good, but the phone seems not to be working at its full potential and you can put the blame on the software for this. The Nubia Z17 mini runs on a dated Android 6.0 Marshmallow with company’s own Nubia UI 4.0 running on top of it. This is where Nubia really need to work. The brand does not have a good past record when it comes to rolling out timely updates. The user interface does make a difference when it comes to improving the performance of the device and this is one is the perfect example of it. Though the UI is pretty clean and comes loaded with some handy features including edge gestures, through which users can perform the different task by using an edge of the screen, it never grew on us. From occasional hiccups to some connectivity issue, this user interface is seriously flawed.
First of all, one need to long press the back button to go to recently opened apps, while the supposed the recent menu button opens widget option. This creates a lot of confusion and sometimes can be a bit frustrating as well. Vivo had the same functionality, however, the brand rectified it and made it convenient for the users to access the apps by pressing the Recent menu button. Moving on, the smartphone eventually slows down, when you open too many apps in the background and the whole experience becomes a tad disappointing. On the bright side, the edge gestures work fine. So for example, one can swipe up/down from the edge to switch between the apps. Then there is the split-screen mode, which can be accessed by swiping up from the bottom of the screen and one can also change the navigation buttons, according to his/her need. Overall, we feel that the brand really need to work on its user interface in order to make the phone faster. Battery and Connectivity The smartphone is powered by a 2950mAh Lithium-ion polymer battery. The battery performance is satisfactory as it able to last a whole day with a single charge under normal usage. However, if you are a power user, then you will get approx. 7 to 8 hours of battery backup, which is again not a good thing. The phone supports fast charging and it gets almost completely charged within 2 hours of continuous charging.
On the connectivity front, it supports dual SIM, 4G VoLTE, Wi-Fi, Bluetooth 4.1, GPS, NFC and USB Type-C port. The phone also comes loaded with DTS audio, which enhances the sound quality while using the headphones, but other than, other things are pretty much similar to any other smartphone out there in the market. Call connectivity is good, though sometimes we had some issue while connecting Bluetooth to different devices. Verdict
To sum up, the dual-camera setup on the Nubia Z17 Mini does a decent job, while the monochrome mode manages to impress us sometimes. The phone looks premium and is a good performer in daily routine. However, the software is in dire need of optimisation and we hope that the company will surely look into this matter. At the end, when compared to the likes of Moto G5 Plus, Honor 8 Lite, Lenovo P2 and more, the smartphone can be considered as an underdog.
1 note
·
View note
Text
AndroidRibbon
A library that lets you implement ribbon ui and shimmer animation.

from The Android Arsenal http://bit.ly/2VMdyRM
0 notes
Text
Game of the Year 2016: My Top Three
It's been a long road for Game of the Year and 2016 in general, but we finally made it to the top three! In case you missed it, there were a ton of other games I loved this year that I wrote about in a post I called "Very Good Games".
And one last thing before we close this out: thanks for reading!
#3. Hyper Light Drifter
This year, no single moment compared to the rush I got from my first chain-dash in Hyper Light Drifter. There's a primal satisfaction to the accelerating timing it demands, as each flash of pink and teal raises the pressure of the impending button press. Eventually I learned that it's not that good in combat and it's only one of many means of survival, yet it was at that precise moment that the game won me over.
I say this without exaggeration: Hyper Light Drifter is a visual masterpiece. Fans and Kickstarter backers have been drooling over screens for years now, and the reality seems to have even exceeded expectations. Environments overflow with lightly muted colors and all kinds of mystery, like enormous Evangelion-inspired beasts, esoteric symbols, and ruins of a civilization long since past. Animation is beautifully handled frame-by-frame, highlighting the tension in each action and closing off with a shimmer of vibrant neon.
It's not an easy game by any means, but success becomes its own reward. Every battle is a fury of bullets and blades with far more dead bodies than dead air. I found myself often getting lost in the chaos, only realizing a room was clear when my darting eyes couldn't find anything new to shoot at. What's unusual, though, is that I didn't find the boss fights to deliver the same sense of exhilaration as the average encounter along the way, but as a capstone to a difficult journey, they work well enough. Maybe I should just be grateful I was never tempted to chuck a controller.
Hyper Light Drifter is enthralling, both in its hectic gameplay and its unwordly atmosphere. I know without a doubt that I'll be back for another shot at deciphering what the hell happened to this world.
#2. Kirby: Planet Robobot
If you've ever daydreamed about what you'd do with your own giant super robot, Kirby: Planet Robobot is a game you need to play. I mean this in the best way possible: it seems like the game was designed by a 6 year old with complete creative authority.
"Give it a giant drill! No, saw blades! Give it flamethrowers! Make it transform into a car! AND a jet!"
Yep, those are all things you can do, and it owns!
The heart of Kirby games has always lied in their diverse power-ups: fire, ice, spark, hammer, bomb, and dozens of others. This time, the sizable set of abilities is doubled by applying not just to Kirby, but his huge, face-shaped armor suit. If Kirby gets a sword, his mech gets two massive beam-sabers. If Kirby gets a jetpack, his mech transforms into a jet! Discovering all of the ways these forms could be used was a joy that lasted me the entire length of the game.
With so many power-ups there's a staggering number of game mechanics at play, which HAL Laboratories take full advantage of in the level design. Whether its a puzzle requiring a certain power-up, a rare boss or ability, or simple visual flair, each stage has some kind of "gimmick" to separate it from the last. Ideas reappear only seldomly, and not without being somehow altered and built upon. Sometimes the game even pretends to be something else entirely, like the shmup style stages that utilize the "Jet" version of the robot armor, or the auto-scrolling stages in the "Wheel" armor. All of this leads to a collection of stages that feel memorable and worth revisiting.
Between its game design and its vast possibility-space, Planet Robobot executes on its concept almost as perfectly as I can imagine. I know Kirby isn't the top Nintendo franchise for most people, but given the run the series is having right now, I'm starting to seriously question how long my little pink creampuff will go underappreciated!
#1. VA-11 HALL-A
VA-11 HALL-A is a visual novel that sounds extremely good in theory - just read its tagline: "cyberpunk bartender action." You play as Jill, who works at a bar called Valhalla in a futuristic city of perpetual darkness, poor people, robots, androids, and most of all, strife. It operates pretty differently as a video game, though. It's often assumed that gameplay exists for the sole purpose of fun, but even for a visual novel, VA-11 HALL-A's simple mechanics took me more than a few drinks to warm up to. Kinda' like in real life, the process of mixing "Brandtinis" and "Bleeding Janes" isn't especially exciting after the first few times, and almost everyone visiting the bar seems to have way more going on in life than you. I just wasn't seeing how it came together. It took some time and careful thought, but by the end of the game it had shaped into something incredible.
It's all thanks to the bar's atmosphere that I stuck around at all, and man, did they nail it. First and foremost, this soundtrack is phenomenal. What woud otherwise be your average cyberpunk setting becomes a wondrous dystopia thanks to Garoad's deft, moody composition. Its implementation is sharp, too. Instead of having music set to match each scene, you're handed complete control over the playlist while on duty. There's a palpable realism to incidentally having serious talks over loud, upbeat music, or joking during an ominous buildup. It helps to give Jill some believable agency as a bartender, too. You can always decide what drink to serve, how strong to mix it, or what music you want to play, but not who comes in that night or what to talk about. Details matter, and the developers at Sukeban Games were paying careful attention.
While Jill herself doesn't seem to bring much nuance to the story (...at first), the rest of the cast handily pick up the slack. The pixel-based character portraits are surprisingly expressive and go a long way in realizing the game's zany, reference-loaded dialog. Dorothy is a definitive fan favorite - she's an android that was specifically engineered to have weaker emotional responses to things that humans often find traumatizing. This trait colors every one of her conversations with typical humans, especially once you figure out that she's a sex-worker. Her career is almost completely inconsequential to her and she LOVES to tease people about it, so the scenes that ensue whenever she meets someone new at Valhalla are pretty entertaining, to say the least. In general, though, Sukeban Games have a firm grasp on how to both play into tropes and subvert them, which allows them to hit their punchlines without compromising any drama during more serious scenes.
My favorite part about VA-11 HALL-A is how much of the narrative the player is trusted to piece together. For a visual novel there's suprisingly little exposition - almost none, actually! It's basically all conversations, and not even ones explicitly about current events. Your only glimpse at what's happening outside of the bar is limited to what you happen to hear, what you choose to read in the news or on shitty forums, and most importantly, what connections you can draw between them. It's amusing to talk to some of the bar's customers, for sure, but your impression might completely change when you realize what they're up to before they stop in or finish their last drink.
The way in which VA-11 HALL-A dismantled my first impression continues to impress me. As the credits rolled it made perfect sense that the bartender would feel less interesting than the guests she serviced. Maybe it shouldn't feel "fun" to Jill when she mixes a drink for a grumpy customer. Maybe it makes sense that a struggling bartender wouldn't have the clearest picture of the "what's" and "why's" of her city's politics. None of that is crucial to finding happiness anyway. VA-11 HALL-A highlighted aspects of life that I don't usually give a second thought to, in a way that feels uncommonly literary for a video game. It's probably not going to be a game for everyone, but to those that seek it out, the narrative at work is nothing short of intoxicating.
1 note
·
View note
Text
N Series Mobile Phones: The World At ft Now
DHD Drone The Droid has the Android a pair.0 operating system with 550MHZ chip. It has a built-in five different.0 megapixel digital camera, Bluetooth, Wi-Fi, GPS and HTML 5 web browser; micro-USB port and 3.5 mm head phone jack. The phone can be maximized to as much as 6 hours of talk-time and 11 hours of standby means. The Droid's design is really not a 'bang' at the first peek. But it's 3.7 inch, 16:9 dimension with 480x854 pixel resolution surpasses the iPhone's and clearly possesses a few great size for touch-screen phone display. What to do: while much Kate did, use soft beige satin or a slight shimmer textured shadow (not frost) to submit an application a sheer highlight. camera lens Enjoy MAC Shroom shadow. For Darker skin tones, try MAC Rice Paper. When it is used along with a Sony Alpha DSLR camera, the Sony 50mm Macro offers 75mm focal length which is the same as 35mm. This focal length allows you to utilize it to be a midrange and standard telephoto lens. The main focus length also allows anyone to capture image background not surprisingly. There would be a build from oils that will need a stronger cleanser. At this stage you need a cleaner is definitely 100% alcohol base, organic turpentine or paint thinners or anything toxic, since Camera goes near facial area and especially your little brown eyes. I feel for a small cost go towards local Camera store and get a lens cleaner which is produced for the job. You want to ensure that you look after your camera lens rather than just ruin it, you paid good money for your camera, so a little more spent on the specialized cleaner is worthwhile. What form of regrets could you end up having if you do not take care of home safe practices? If you're lucky, you may have none. Might want to live due to the fact one-in-a-million household that criminals never even take a glance at. On the other hand, if tend not to implement any measures, you could be targeted the identical day that the house is scoped obtainable. You could stand to lose it all too. In case you are like most householders you keep valuable electronics inside your home, and also cash and jewellery. Even if you keep them locked up, it this would definately be only to do with time before a criminal gets their grubby mitts those items once they break while. The only way to safeguard them completely would be deter criminals from even trying to step foot inside residence. Another tween boy stocking stuffer idea is a cell some of the. They are getting cheaper and cheaper each and every. You could add them to your plan or buy a pay as you go phone from Target or Wal-mart, they run fairly low-budget. You could also get the boys an i-pod or include i-pods and cell phones combined into one. The i-pod alone is merely device perform download music to and play through earphones. A good photography tip that can help you is in order to consider a step back from your work sometimes. A photograph you mightn't have like before might suddenly seem fascinating to you. Extremely important to step away from function so might always have a fresh outlook on life.
0 notes
Photo
New Post has been published on http://programmingbiters.com/android-content-placeholder-animation-like-facebook-using-shimmer/
Android Content Placeholder Animation like Facebook using Shimmer
We normally use spinner loaders when the app wants to load the data from a network call. Instead of using the usual loaders, we can make the loading screen more interesting using Facebook’s Shimmer library. This library adds Shimmer effect on to any custom view that we define. You can notice this shimmer effect in Facebook’s mobile and desktop apps.
This article explains how to use the Shimmer library in your apps with an example of loading a list data from a JSON http call.
VIDEO DEMO
youtube
1. Facebook’s Shimmer Library
To get shimmer effect on any layout, you have to place your layout inside ShimmerFrameLayout. To start the animation, you have to call startShimmerAnimation() on ShimmerFrameLayout. That’s all, you can immediately notice the shimmer effect on your layout. You can find the additional documentation on the Shimmer’s page.
Below is the code snippet to get the Shimmer effect. First, place your layout inside ShimmerFrameLayout.
To start the animation, call startShimmerAnimation() from your activity.
ShimmerFrameLayout shimmerContainer = (ShimmerFrameLayout) findViewById(R.id.shimmer_view_container); shimmerContainer.startShimmerAnimation();
2. Sample JSON
To demonstrate this example, I have created a sample JSON that contains a list of recipes. This endpoint simulates the network delay by adding 2 sec delay before responding the JSON so that the Shimmer effect can be noticed.
https://api.androidhive.info/json/shimmer/menu.php
[ "id": 1, "name": "Salmon Teriyaki", "description": "Put the ginger and garlic into a bowl and mix with the soy sauce, maple syrup, mirin and a drizzle of olive oil", "price": 140, "chef": "Gordon Ramsay", "thumbnail": "https://api.androidhive.info/images/food/1.jpg", "timestamp": "2 min ago" , "id": 2, "name": "Grilled Mushroom", "description": "Combine butter, dill and garlic salt, brush over mushrooms.", "price": 150, "chef": "Ravi Tamada", "thumbnail": "https://api.androidhive.info/images/food/2.jpg", "timestamp": "5 min ago" ]
Let’s try the Shimmer library by creating a simple app.
3. Creating New Project
1. Create a new project in Android Studio from File ⇒ New Project and select Basic Activity from templates.
2. Add Shimmer dependency to your build.gradle and rebuild the project.
dependencies implementation fileTree(dir: 'libs', include: ['*.jar']) implementation 'com.android.support:appcompat-v7:26.1.0' // Shimmer implementation 'com.facebook.shimmer:shimmer:0.1.0@aar'
3. Add the below colors and dimens to respective files.
#d91248 #d91248 #3ad23e #dddddd #0c0c0c #1a1a1a #777 #777
16dp 50dp 8dp 16dp 10dp 15dp 12dp 11dp 15dp 13dp
4. Create a new layout xml file named recipe_placeholder_item.xml. In this file we define the placeholder layout using plain View elements. All the views will be placed similar to actual list items.
5. As the placeholder view is ready, let’s add it to our main activity layout. Open the layout file of your main activity i.e activity_main.xml and include the placeholder layout. We are including the placeholder layout three times to make it appear as list.
6. Open MainActivity.java and start the Shimmer animation by calling startShimmerAnimation() method in onResume(). We are also pausing the animation in onPause() when the activity is paused.
import com.facebook.shimmer.ShimmerFrameLayout; public class MainActivity extends AppCompatActivity private ShimmerFrameLayout mShimmerViewContainer; @Override protected void onCreate(Bundle savedInstanceState) super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); mShimmerViewContainer = findViewById(R.id.shimmer_view_container); @Override public void onResume() super.onResume(); mShimmerViewContainer.startShimmerAnimation(); @Override public void onPause() mShimmerViewContainer.stopShimmerAnimation(); super.onPause();
Now if you run the app, you can see the below Shimmer animation.
3.1 Loading feed from JSON and hiding the Shimmer
Now as our Shimmer loader is ready, let’s see how to load the JSON feed in RecyclerView and hide the shimmer loader once the list is rendered. By following the remaining part of the article, you will understand how to implement the Shimmer effect in a real world app.
7. Open the build.gradle and add RecyclerView, Glide and Volley dependencies.
dependencies implementation fileTree(dir: 'libs', include: ['*.jar']) implementation 'com.android.support:appcompat-v7:26.1.0' // ... // Shimmer implementation 'com.facebook.shimmer:shimmer:0.1.0@aar' // RecyclerView implementation 'com.android.support:recyclerview-v7:26.1.0' // glide image library implementation 'com.github.bumptech.glide:glide:3.7.0' // volley http library implementation 'com.android.volley:volley:1.0.0' implementation 'com.google.code.gson:gson:2.6.2'
8. Create a class named MyApplication.java and extend the class from Application. This is a singleton class in which the Volley library will be initiated.
package info.androidhive.shimmer; /** * Created by ravi on 18/01/18. */ import android.app.Application; import android.text.TextUtils; import com.android.volley.Request; import com.android.volley.RequestQueue; import com.android.volley.toolbox.Volley; public class MyApplication extends Application public static final String TAG = MyApplication.class .getSimpleName(); private RequestQueue mRequestQueue; private static MyApplication mInstance; @Override public void onCreate() super.onCreate(); mInstance = this; public static synchronized MyApplication getInstance() return mInstance; public RequestQueue getRequestQueue() if (mRequestQueue == null) mRequestQueue = Volley.newRequestQueue(getApplicationContext()); return mRequestQueue; public void addToRequestQueue(Request req, String tag) // set the default tag if tag is empty req.setTag(TextUtils.isEmpty(tag) ? TAG : tag); getRequestQueue().add(req); public void addToRequestQueue(Request req) req.setTag(TAG); getRequestQueue().add(req); public void cancelPendingRequests(Object tag) if (mRequestQueue != null) mRequestQueue.cancelAll(tag);
9. Open AndroidManifest.xml and add the MyApplication class to tag. We also need INTERNET permission as we are going to make http calls.
10. Open activity_main.xml and add RecyclerView widget below the ShimmerFrameLayout.
11. Create a new class named Recipe.java and define the following variables. This is a POJO class used to serialize the JSON.
package info.androidhive.shimmer; /** * Created by ravi on 18/01/18. */ public class Recipe int id; String name; String description; double price; String thumbnail; String chef; String timestamp; public Recipe() public int getId() return id; public String getName() return name; public String getDescription() return description; public double getPrice() return price; public String getThumbnail() return thumbnail; public String getChef() return chef; public String getTimestamp() return timestamp;
12. Create a new xml layout named recipe_list_item.xml. This layout holds the actual list row with a thumbnail image and few TextViews.
13. We need another class to write the necessary adapter required for RecyclerView. Create a class named RecipeListAdapter.java and add below code.
package info.androidhive.shimmer; /** * Created by ravi on 18/01/18. */ import android.content.Context; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.TextView; import com.bumptech.glide.Glide; import java.util.List; public class RecipeListAdapter extends RecyclerView.Adapter private Context context; private List cartList; public class MyViewHolder extends RecyclerView.ViewHolder public TextView name, description, price, chef, timestamp; public ImageView thumbnail; public MyViewHolder(View view) super(view); name = view.findViewById(R.id.name); chef = view.findViewById(R.id.chef); description = view.findViewById(R.id.description); price = view.findViewById(R.id.price); thumbnail = view.findViewById(R.id.thumbnail); timestamp = view.findViewById(R.id.timestamp); public RecipeListAdapter(Context context, List cartList) this.context = context; this.cartList = cartList; @Override public MyViewHolder onCreateViewHolder(ViewGroup parent, int viewType) View itemView = LayoutInflater.from(parent.getContext()) .inflate(R.layout.recipe_list_item, parent, false); return new MyViewHolder(itemView); @Override public void onBindViewHolder(MyViewHolder holder, final int position) final Recipe recipe = cartList.get(position); holder.name.setText(recipe.getName()); holder.chef.setText("By " + recipe.getChef()); holder.description.setText(recipe.getDescription()); holder.price.setText("Price: ₹" + recipe.getPrice()); holder.timestamp.setText(recipe.getTimestamp()); Glide.with(context) .load(recipe.getThumbnail()) .into(holder.thumbnail); // recipe @Override public int getItemCount() return cartList.size();
14. Now we have everything in place. Open MainActivity.java and modify the code as shown below.
> fetchRecipes() method fetches the JSON by making Volley’s http call. The JSON is parsed using Gson serializer.
> Once the JSON is parsed and added to RecyclerView adapter, the list is rendered and ShimmerFrameLayout is hidden making the actual list visible on the screen.
package info.androidhive.shimmer; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.support.v7.widget.DefaultItemAnimator; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.util.Log; import android.view.View; import android.widget.Toast; import com.android.volley.Response; import com.android.volley.VolleyError; import com.android.volley.toolbox.JsonArrayRequest; import com.facebook.shimmer.ShimmerFrameLayout; import com.google.gson.Gson; import com.google.gson.reflect.TypeToken; import org.json.JSONArray; import java.util.ArrayList; import java.util.List; public class MainActivity extends AppCompatActivity private static final String TAG = MainActivity.class.getSimpleName(); private RecyclerView recyclerView; private List cartList; private RecipeListAdapter mAdapter; private ShimmerFrameLayout mShimmerViewContainer; // URL to fetch menu json // this endpoint takes 2 sec before giving the response to add // some delay to test the Shimmer effect private static final String URL = "https://api.androidhive.info/json/shimmer/menu.php"; @Override protected void onCreate(Bundle savedInstanceState) super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); mShimmerViewContainer = findViewById(R.id.shimmer_view_container); recyclerView = findViewById(R.id.recycler_view); cartList = new ArrayList<>(); mAdapter = new RecipeListAdapter(this, cartList); RecyclerView.LayoutManager mLayoutManager = new LinearLayoutManager(getApplicationContext()); recyclerView.setLayoutManager(mLayoutManager); recyclerView.setItemAnimator(new DefaultItemAnimator()); recyclerView.addItemDecoration(new MyDividerItemDecoration(this, LinearLayoutManager.VERTICAL, 16)); recyclerView.setAdapter(mAdapter); // making http call and fetching menu json fetchRecipes(); /** * method make volley network call and parses json */ private void fetchRecipes() JsonArrayRequest request = new JsonArrayRequest(URL, new Response.Listener() @Override public void onResponse(JSONArray response) if (response == null) Toast.makeText(getApplicationContext(), "Couldn't fetch the menu! Pleas try again.", Toast.LENGTH_LONG).show(); return; List recipes = new Gson().fromJson(response.toString(), new TypeToken>() .getType()); // adding recipes to cart list cartList.clear(); cartList.addAll(recipes); // refreshing recycler view mAdapter.notifyDataSetChanged(); // stop animating Shimmer and hide the layout mShimmerViewContainer.stopShimmerAnimation(); mShimmerViewContainer.setVisibility(View.GONE); , new Response.ErrorListener() @Override public void onErrorResponse(VolleyError error) // error in getting json Log.e(TAG, "Error: " + error.getMessage()); Toast.makeText(getApplicationContext(), "Error: " + error.getMessage(), Toast.LENGTH_SHORT).show(); ); MyApplication.getInstance().addToRequestQueue(request); @Override public void onResume() super.onResume(); mShimmerViewContainer.startShimmerAnimation(); @Override public void onPause() mShimmerViewContainer.stopShimmerAnimation(); super.onPause();
I hope this article is pretty simple and explained very well about Shimmer library. If you have any queries, do post them in comments section below.
Hi there! I am Founder at androidhive and programming enthusiast. My skills includes Android, iOS, PHP, Ruby on Rails and lot more. If you have any idea that you would want me to develop? Let’s talk: [email protected]
(function(d, s, id) var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = "http://connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.9"; fjs.parentNode.insertBefore(js, fjs); (document, 'script', 'facebook-jssdk'));
قالب وردپرس
0 notes
Text
AndroidVeil
A library that let you implement veil skeletons and shimmer animation.
from The Android Arsenal https://ift.tt/2AHzRj6
0 notes